import py2exe,sys
from distutils.core import setup

lines = open('win-pkg.ver').xreadlines()
import itertools
f = itertools.dropwhile(lambda l:not l.startswith('VERSION'),lines)
ver = f.next().split(':')[1].strip()
date = f.next().split(':')[1].strip()
open('version.py','w').write("""\
VERSION="%s"
DATE="%s"
"""%(ver,date))
setup(console=('win-pkg.py',), 
      windows=('postinst.py',), 
      data_files=('wget.exe','python.ico', 'win-pkg.ver'))
